package demo1;

import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-03-24
 * Time: 12:20
 */
public class Test1 {

    public static void main(String[] args) {
        ArrayList<Integer> arr1 = new ArrayList<>();
        arr1.add(1);
        arr1.add(2);
        arr1.add(3);
        arr1.add(4);
        ArrayList<Integer> arr2 = new ArrayList<>();
        arr2.addAll(arr1);
        arr2.add(11);
        System.out.println(arr2);
    }

    public static void main1(String[] args) {
        LinkedList<Integer> list = new LinkedList<>();
        list.add(100);
        ArrayList<Integer> arr1 = new ArrayList<>(list);
        arr1.add(99);
        System.out.println(arr1);
    }
}
